
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a[] = {9,8,7,6,5,4,3,2,1};
    int index = lower_bound(a,a+10,1)-a; //一定要记得-a  否则返回的是迭代器，一个地址值，int * ,会报错
    cout<<index;
    return 0;
}
